#!/bin/bash

log=log.log
rm -f ${log}
touch $log

cc_num=$1
script=$2
duration=$3

if [[ $# -lt 3 ]];then
    echo "input <cc_num: int> <python_script> and <duration: int> ..."
    exit 1
fi

for ((i=0;i<${cc_num};i++)); do
    {
        python ${script} $i $duration
    } &
    sleep 0.1
done
wait

python calc_perf.py $log
